<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 语法————  条件？条件为true的时候执行：条件为false的时候执行；

    //   10<20?console.log('对'):console.log('不对')
    var a =100;
    var b =  a > 200 ? a-10 :  a ;
    
    console.log('原价'+a)
    console.log('折后价'+b)
</script>
</html>